package simpletrace

import (
	"context"
)

type SpanReader interface {
	Read(ctx context.Context, traceID string) (*Span, error)
	GetAllSpanIDs(ctx context.Context, traceID string) ([]string, error)
	GetSpanDataStr(ctx context.Context, traceID, spanID string) (string, error)
	GetTraceRootSpans(ctx context.Context, traceID []string) ([]*Span, error)
	GetAllTraces(ctx context.Context) ([]string, error)
	CountSpans(ctx context.Context, traceID string) (int64, error)
	GetTraceMemUsage(ctx context.Context, traceID string) (int64, error)

	SpanCleaner
}

type SpanCleaner interface {
	Clean(ctx context.Context) error
	CleanByTraceID(ctx context.Context, traceID string) error
}